Entropy-guided text prediction using combined word and character n-gram language models

ABSTRACT

Systems and processes are disclosed for predicting words in a text entry environment. Candidate words and probabilities associated therewith can be determined by combining a word n-gram language model and a character m-gram language model. Based on entered text, candidate word probabilities from the word n-gram language model can be integrated with the corresponding candidate character probabilities from the character m-gram language model. A reduction in entropy can be determined from integrated candidate word probabilities before entry of the most recent character to integrated candidate word probabilities after entry of the most recent character. If the reduction in entropy exceeds a predetermined threshold, candidate words with high integrated probabilities can be displayed or otherwise made available to the user for selection. Otherwise, displaying candidate words can be deferred (e.g., pending receipt of an additional character from the user leading to reduced entropy in the candidate set).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority from U.S. Provisional Ser. No.62/005,825, filed on May 30, 2014, entitled ENTROPY-GUIDED TEXTPREDICTION USING COMBINED WORD AND CHARACTER N-GRAM LANGUAGE MODELS,which is hereby incorporated by reference in its entirety for allpurposes.

This application also relates to the following co-pending provisionalapplications: U.S. Patent Application Ser. No. 62/005,837, “Device,Method, and Graphical User Interface for a Predictive Keyboard,” filedMay 30, 2014; U.S. Patent Application Ser. No. 62/046,876, “Device,Method, and Graphical User Interface for a Predictive Keyboard,” filedSep. 5, 2014; U.S. patent application Ser. No. 62/005,942, “TextPrediction Using Combined Word N-gram and Unigram Language Models,”filed May 30, 2014; U.S. Patent Application Ser. No.62/006,010“Predictive Text Input,” filed May 30, 2014; and U.S. PatentApplication Ser. No. 62/005,958, “Canned Answers in Messages,” filed May30, 2014; which are hereby incorporated by reference in their entiretyfor all purposes.

FIELD

This relates generally to text prediction and, more specifically, topredicting words by combining word and character n-gram language modelsand displaying results according to entropy reduction.

BACKGROUND

Electronic devices and the ways in which users interact with them areevolving rapidly. Changes in size, shape, input mechanisms, feedbackmechanisms, functionality, and the like have introduced new challengesand opportunities relating to how a user enters information, such astext. Statistical language modeling can play a central role in many textprediction and recognition problems, such as speech or handwritingrecognition and keyboard input prediction. An effective language modelcan be critical to constrain the underlying pattern analysis, guide thesearch through various (partial) text hypotheses, and/or contribute tothe determination of the final outcome. In some examples, statisticallanguage modeling has been used to convey the probability of occurrencein the language of all possible strings of n words.

Given a vocabulary of interest for the expected domain of use,determining the probability of occurrence of all possible strings of nwords has been done using a word n-gram model, which can be trained toprovide the probability of the current word given the n−1 previouswords. Training has typically involved large machine-readable textdatabases, comprising representative documents in the expected domain.Even so, due to the finite size of such databases, many occurrences ofn-word strings can be seen infrequently, yielding unreliable parametervalues for all but the smallest values of n. Compounding the problem, insome applications it can be cumbersome or impractical to gather a largeenough amount of training data. In other applications, the size of theresulting model may exceed what can reasonably be deployed. In someinstances, training data sets and n-gram models can be pruned to anacceptable size, which can negatively impact the predictive power of theresulting pruned models.

In such situations, it has often been expedient to rely on a characterm-gram model. Just as a word n-gram can be based on strings of n words,a character m-gram can be based on strings of m characters, wheretypically m>n. Thus a character m-gram can be trained to provide theprobability of the current character given the m−1 previous charactersencountered. Because the number of characters in the alphabet istypically much smaller than the number of words in the vocabulary, acharacter m-gram can be much more compact than a word n-gram for usualvalues of m and n. Thus, a proper estimation can be performed with a lotless data, which makes such models particularly popular for embeddedapplications.

While character m-grams are typically more compact and easier toestimate than word n-grams, they can also be less predictive due to themuch coarser granularity involved. On the other hand, character m-gramstend to be more robust, in the sense that they generalize better toout-of-vocabulary words. In text prediction applications in particular,a character model can be coupled with a large domain-appropriate lexiconto provide whole word completions and predictions, rather thansemantically meaningless partial fragments. This combination, however,can still suffer from an inherent lack of predictive power due to thecharacter restriction of character m-grams.

Accordingly, using either a word n-gram model or a character m-grammodel for particular applications can limit overall prediction accuracy,either due to an inherent lack of predictive power due to the characterrestriction in the case of character m-gram models, or due to a de factolack of predictive power from excessive pruning in the case of wordn-gram models.

SUMMARY

Systems and processes are disclosed for predicting and displaying wordsby combining a word n-gram language model and a character m-gramlanguage model and displaying results according to entropy reduction. Inone example, typed input can be received from a user. Using a wordn-gram model, a probability of a predicted word can be determined basedon a previously entered word in the typed input. Using a characterm-gram model, a probability of a predicted character can be determinedbased on a previously entered character in the typed input. Anintegrated probability of the predicted word can be determined based onthe probability of the predicted word and the probability of thepredicted character. The predicted word can then be displayed based onthe integrated probability.

In some examples, first probabilities of a first set of possible wordcompletions can be determined based on a first typed character in thetyped input. The first set of possible word completions can include thepredicted word, and the first probabilities can include the integratedprobability of the predicted word. Second probabilities of a second setof possible word completions can be determined based on the first typedcharacter and a second typed character in the typed input. The secondset of possible word completions can include the predicted word. Areduction in entropy can be determined from the first probabilities ofthe first set to the second probabilities of the second set. In responseto the reduction in entropy exceeding a threshold, the predicted wordcan be displayed.

In another example, a first typed character can be received from a user.A first entropy of a first set of possible word completions can bedetermined based on first probabilities of the first set of possibleword completions, wherein the first probabilities are based on the firsttyped character. A second typed character can be received from the user.A second entropy of a second set of possible word completions can bedetermined based on second probabilities of the second set of possibleword completions, wherein the second probabilities are based on thefirst typed character and the second typed character. A reduction inentropy from the first entropy to the second entropy can be determined.In response to the reduction in entropy exceeding a threshold, acandidate word can be displayed from the second set of possible wordcompletions.

In another example, a first typed character can be received from a user.First probabilities of a first set of possible word completions can bedetermined based on the first typed character. A second typed charactercan be received from the user. Second probabilities of a second set ofpossible word completions can be determined based on the first typedcharacter and the second typed character. A reduction in entropy can bedetermined from the first probabilities of the first set to the secondprobabilities of the second set. In response to the reduction in entropyexceeding a threshold, a candidate word can be displayed from the secondset of possible word completions.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary system for predicting words.

FIG. 2 illustrates an exemplary process for predicting words using aword n-gram model and a character m-gram model.

FIG. 3 illustrates exemplary observed and predicted words and charactersin a word n-gram language model and character m-gram language model.

FIG. 4 illustrates an exemplary process for determining word predictioncandidates to be displayed based on prediction set entropies.

FIG. 5 illustrates an exemplary process for determining word predictioncandidates to be displayed based on entropy reduction.

FIG. 6 illustrates an exemplary process for predicting words anddisplaying them according to entropy reduction.

FIG. 7 illustrates an exemplary process for predicting and displayingwords by combining a word n-gram language model and a character m-gramlanguage model and displaying results according to entropy reduction.

FIG. 8 illustrates a functional block diagram of an electronic deviceconfigured to predict words using a word n-gram model and a characterm-gram model.

FIG. 9 illustrates a functional block diagram of an electronic deviceconfigured to determine word prediction candidates to be displayed basedon prediction set entropies.

FIG. 10 illustrates a functional block diagram of an electronic deviceconfigured to determine word prediction candidates to be displayed basedon entropy reduction.

DETAILED DESCRIPTION

In the following description of examples, reference is made to theaccompanying drawings in which it is shown by way of illustrationspecific examples that can be practiced. It is to be understood thatother examples can be used and structural changes can be made withoutdeparting from the scope of the various examples.

This relates to systems and processes for predicting words in a textentry environment. In one example, candidate words and probabilitiesassociated therewith can be determined by combining a word n-gramlanguage model and a character m-gram language model. Using the wordn-gram language model, based on previously entered words, candidatewords can be identified and a probability can be calculated for eachcandidate word. Such a probability can signify a likelihood that acandidate word corresponds to a word a user will enter. Using thecharacter m-gram language model, based on previously entered characters,candidate characters can be identified and a probability can becalculated for each candidate character. Such a probability can signifya likelihood that a candidate character corresponds to a character auser will enter. The candidate word probabilities can be integrated withthe corresponding candidate character probabilities. A reduction inentropy can be determined from integrated candidate word probabilitiesbefore entry of the most recent character to integrated candidate wordprobabilities after entry of the most recent character. If the reductionin entropy exceeds a predetermined threshold, candidate words with highintegrated probabilities can be displayed or otherwise made available tothe user for selection. Otherwise, displaying candidate words can bedeferred (e.g., pending receipt of an additional character from the userleading to reduced entropy in the candidate set).

By integrating word and character language models, the strengths of eachapproach can be leveraged at the same time. This can aid in providingaccurate and meaningful candidate word suggestions to a user enteringtext. With meaningful candidate word suggestions, a user can enter textquickly and efficiently by selecting suggested candidates instead ofentering all characters individually for all words. In addition, byemploying an entropy reduction threshold to determine when candidatesuggestions should be provided to a user, the user experience can beoptimized. For example, in some text entry environments, screen realestate can be at a premium (e.g., handheld mobile devices). It can,therefore, be preferable to deliver only those candidate words thatprovide the highest level of value for users, and an entropy reductionthreshold can be employed in this manner to limit candidate wordintrusion and optimize the user experience. It should be understood,however, that still many other advantages can be achieved according tothe various examples discussed herein.

FIG. 1 illustrates exemplary system 100 for predicting words. In oneexample, system 100 can include user device 102 (or multiple userdevices 102) that can provide a text entry interface or environment.User device 102 can include any of a variety of devices, such as acellular telephone (e.g., smartphone), tablet computer, laptop computer,desktop computer, portable media player, wearable digital device (e.g.,digital glasses, wristband, wristwatch, brooch, armbands, etc.),television, set top box (e.g., cable box, video player, video streamingdevice, etc.), gaming system, or the like. In some examples, user device102 can include display 114. Display 114 can include any of a variety ofdisplays, and can also include a touchscreen, buttons, or otherinteractive elements. In one example, display 114 can be incorporatedwithin user device 102 (e.g., as in a touchscreen, integrated display,etc.). In other examples, display 114 can be external to—butcommunicatively coupled to—user device 102 (e.g., as in a television,external monitor, projector, etc.).

In some examples, user device 102 can include or be communicativelycoupled to keyboard 116, which can capture user-entered text (e.g.,characters, words, symbols, etc.). Keyboard 116 can include any of avariety of text entry mechanisms and devices, such as a stand-aloneexternal keyboard, a virtual keyboard, a remote control keyboard, ahandwriting recognition system, or the like. In one example, forinstance, keyboard 116 can include a virtual keyboard on a touchscreencapable of receiving text entry from a user (e.g., detecting characterselections from touch). In another example, keyboard 116 can include avirtual keyboard shown on a display (e.g., display 114), and a pointeror other indicator can be used to indicate character selection (e.g.,indicating character selection using a mouse, remote control, pointer,button, gesture, eye tracker, etc.). In yet another example, keyboard116 can include a touch sensitive device capable of recognizinghandwritten characters. In still other examples, keyboard 116 caninclude other mechanisms and devices capable of receiving text entryfrom a user.

User device 102 can also include processor 104, which can receive textentry from a user (e.g., from keyboard 116) and interact with otherelements of user device 102 as shown. In one example, processor 104 canbe configured to perform any of the methods discussed herein, such aspredicting words and causing them to be displayed by combining a wordn-gram language model and a character m-gram language model anddisplaying results according to entropy reduction. In other examples,processor 104 can cause data (e.g., entered text, user data, etc.) to betransmitted to server system 120 through network 118. Network 118 caninclude any of a variety of networks, such as a cellular telephonenetwork, WiFi network, wide area network, local area network, theInternet, or the like. Server system 120 can include a server, storagedevices, databases, and the like and can be used in conjunction withprocessor 104 to perform any of the methods discussed herein. Forexample, processor 104 can cause an interface to be provided to a userfor text entry, can receive entered text, can transmit some or all ofthe entered text to server system 120, and can cause predicted words tobe displayed on display 114.

In some examples, user device 102 can include storage device 106, memory108, word n-gram language model 110, and character m-gram language model112. In some examples, word n-gram language model 110 and characterm-gram language model 112 can be stored on storage device 106, and canbe used to predict words and determine probabilities according to themethods discussed herein. Language models 110 and 112 can be trained onany of a variety of text data, and can include domain-specific modelsfor use in particular applications, as will be appreciated by one ofordinary skill in the art.

Thus, any of the functions or methods discussed herein can be performedby a system similar or identical to system 100. It should be appreciatedthat system 100 can include instructions stored in a non-transitorycomputer readable storage medium, such as memory 108 or storage device106, and executed by processor 104. The instructions can also be storedand/or transported within any non-transitory computer readable storagemedium for use by or in connection with an instruction execution system,apparatus, or device, such as a computer-based system,processor-containing system, or other system that can fetch theinstructions from the instruction execution system, apparatus, or deviceand execute the instructions. In the context of this document, a“non-transitory computer readable storage medium” can be any medium thatcan contain or store the program for use by or in connection with theinstruction execution system, apparatus, or device. The non-transitorycomputer readable storage medium can include, but is not limited to, anelectronic, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, or device, a portable computer diskette(magnetic), a random access memory (RAM) (magnetic), a read-only memory(ROM) (magnetic), an erasable programmable read-only memory (EPROM)(magnetic), a portable optical disc such as CD, CD-R, CD-RW, DVD, DVD-R,or DVD-RW, or flash memory such as compact flash cards, secured digitalcards, USB memory devices, memory sticks, and the like.

The instructions can also be propagated within any transport medium foruse by or in connection with an instruction execution system, apparatus,or device, such as a computer-based system, processor-containing system,or other system that can fetch the instructions from the instructionexecution system, apparatus, or device and execute the instructions. Inthe context of this document, a “transport medium” can be any mediumthat can communicate, propagate, or transport the program for use by orin connection with the instruction execution system, apparatus, ordevice. The transport medium can include, but is not limited to, anelectronic, magnetic, optical, electromagnetic, or infrared wired orwireless propagation medium.

It should be understood that the system is not limited to the componentsand configuration of FIG. 1, but can include other or additionalcomponents in multiple configurations according to various examples. Forexample, user device 102 can include a variety of other mechanisms forreceiving input from a user, such as a microphone, optical sensor,camera, gesture recognition sensor, proximity sensor, ambient lightsensor, or the like. Additionally, the components of system 100 can beincluded within a single device, or can be distributed among multipledevices. For example, although FIG. 1 illustrates word n-gram languagemodel 110 and character m-gram language model 112 as part of user device102, it should be appreciated that, in other examples, the functions ofprocessor 104 can be performed by server system 120, and/or word n-gramlanguage model 110 and character m-gram language model 112 can be storedremotely as part of server system 120 (e.g., in a remote storagedevice). In still other examples, language models and other data can bedistributed across multiple storage devices, and many other variationsof system 100 are also possible.

FIG. 2 illustrates exemplary process 200 for predicting words using aword n-gram model and a character m-gram model. Process 200 can, forexample, be executed on processor 104 of system 100 utilizing wordn-gram language model 110 and character m-gram language model 112discussed above with reference to FIG. 1. At block 202, typed input canbe received from a user. Typed input can be received in any of a varietyof ways, such as from keyboard 116 in system 100 discussed above. Thetyped input can include a single typed character, such as a letter orsymbol. The typed input can also include a string of characters, a word,multiple words, multiple sentences, or the like. User-entered inputreceived at block 202 can be directed to any type of text entryinterface or environment on a user device. For example, such aninterface could be configured for typing text messages, emails, webaddresses, documents, presentations, search queries, media selections,commands, form data, calendar entries, notes, or the like.

The typed input received at block 202 can be used to predict a word. Forexample, the typed input can be used to predict the likely completion ofa partially-entered word, a subsequent word likely to be enteredfollowing previously-entered words, a phrase or a group of words likelyto be entered following previously-entered words, or the like.Previously-entered characters or words can be considered observedcontext that can be used to make predictions. FIG. 3 illustratesexemplary observed context 330 and prediction 332. In one example,observed context 330 can include observed words 338, some or all ofwhich can correspond to the typed input received from a user at block202 of process 200. Observed context 330 can also include observedcharacters 340, some or all of which can correspond to observed words338 and the typed input received from a user at block 202. For example,observed characters 340 can include some or all of the individualcharacters that make up observed words 338 as well as any spaces betweenthe words.

For reference, and as noted in FIG. 3, let:W _(q−n+1) ^(q) =w _(q−n+1) w _(q−n+2) . . . w _(q−1) w _(q)denote the string of n words relevant to the prediction of the currentword w_(q) (noted as predicted word 342), and let:C _(p−m+1) ^(p) =c _(p−m+1) c _(p−m+2) . . . c _(p−1) c _(p)denote the string of m characters relevant to the prediction of thecurrent character c_(p) (noted as predicted character 346), where c_(p)can (arbitrarily) be assumed to be the first character making up w_(q).Also, for further reference, predicted word 342 can include characters344, in that w_(q) can be formed out of a string of characters x₁ . . .x_(k) . . . x_(K), where K can be the total number of characters inw_(q). For purposes of explanation, it can be assumed that c_(p)=x₁. Aswill be discussed in further detail below, observed words 338 can beused in word language model 334 to determine predicted word 342.Similarly, observed characters 340 can be used in character languagemodel 336 to determine predicted character 346. The upper portion ofFIG. 3 illustrates observed context 330 at a time 350, while the lowerportion of FIG. 3 illustrates observed context 330 at a later time 352after addition characters have been observed (e.g., after additionalcharacters have been received from the user). As illustrated, there canbe a word boundary at time 350 with no partial character expansion ofthe predicted word (e.g., k=1).

Referring again to process 200 of FIG. 2, at block 204, a probability ofa predicted word can be determined based on a previously entered wordusing a word n-gram model (e.g., word n-gram language model 110 of FIG.1, and as illustrated by word language model 334 of FIG. 3). Asunderstood by one of ordinary skill in the art, a word n-gram model cancompute the probability of a current word w_(q) given the available wordhistory, as in the following:Pr(w_(q)|W_(q−n+1) ^(q−1)),   (1)where W_(q−n+1) ^(q−1) provides the relevant string of n−1 words. Thisprobability can signify a likelihood that a candidate word (e.g.,predicted word 342 of FIG. 3) corresponds to a word a user will enter(or a word a user will complete in the instance where one or morecharacters has already been entered). One of ordinary skill in the artwill understand that the value of n can be varied as desired, and a wordn-gram model can compute a probability of a predicted word given anyamount of available word history (e.g., zero words, one word, two words,etc.).

Referring again to process 200 of FIG. 2, at block 206, a probability ofa predicted character can be determined based on a previously enteredcharacter using a character m-gram model (e.g., character m-gramlanguage model 112 of FIG. 1, and as illustrated by character languagemodel 336 of FIG. 3). As understood by one of ordinary skill in the art,a character m-gram model can compute the probability of a currentcharacter c_(p) given the available character history, as in thefollowing:Pr(c_(p)|C_(p−m+1) ^(p−1)),   (2)where C_(p−m+1) ^(p−1) provides the relevant string of m−1 characters.This probability can signify a likelihood that a candidate character(e.g., predicted character 346 of FIG. 3) corresponds to a character auser will enter. One of ordinary skill in the art will understand thatthe value of m can be varied as desired, and a character m-gram modelcan compute a probability of a predicted character given any amount ofavailable character history (e.g., zero characters, one character, twocharacters, etc.).

Referring again to process 200 of FIG. 2, at block 208, an integratedprobability of the predicted word from block 204 can be determined basedon the probability of the corresponding predicted character from block206. As mentioned above, this approach can combine the benefits of botha word n-gram model and a character m-gram model to obtain accurate wordpredictions. As discussed in further detail below, however, the approachdiscussed herein can provide an integrated language model outside ofrestricted solutions involving, for example, an arbitrarily interpolatedprobability.

Referring again to FIG. 3, at a given time 350, there can be an observedword history W_(q−n+1) ^(q−1) including observed words 338. The observedword history can include recently entered words. For example, recentlyentered words can include words entered in a current input session(e.g., in a current text message, a current email, a current document,etc.). For predicting words, the recently entered words can include thelast n words entered (e.g., the last three words, the last four words,the last five words, or any other number of words). There can also be anobserved character history C_(p−m+1) ^(p−1) including observedcharacters 340. As mentioned above, observed character 340 can includethe individual characters of observed words 338. The observed characterhistory can thus include recently entered characters in a current inputsession, including the last m characters entered (e.g., the last threecharacters, the last four characters, the last five characters, or anyother number of characters). No assumption needs to be made on thecomparative length of the observed word string and observed characterstring. The desired prediction can involve both the current predictedword w_(q) and a partial character expansion of w_(q) as x₁x₂ . . .x_(k) with 1≤k≤K. The case k=K can be omitted, as the characterexpansion would otherwise be identical to the word w_(q) and would thusoffer only a redundant prediction.

With this setup, a joint probability of the current word w_(q) and thepartial character expansion x₁x₂ . . . x_(k) can be computed given allrelevant history, as in the following:Pr(w_(q)x₁ . . . x_(k)|W_(q−n+1) ^(q−1)C_(p−m+1) ^(p−1)).   (3)This joint probability can be simplified while making few assumptions onthe structure of the word and class history.

Using the definition of a conditional probability, expression (3) can bemanipulated as follows to achieve the following outcome expression (4):

$\begin{matrix}{{\Pr\left( {w_{q}x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}} \middle| {W_{q - n + 1}^{q - 1}C_{p - m + 1}^{p - 1}} \right)} = {\frac{\Pr\left( {w_{q}x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}W_{q - n + 1}^{q - 1}C_{p - m + 1}^{p - 1}} \right)}{\Pr\left( {W_{q - n + 1}^{q - 1}C_{p - m + 1}^{p - 1}} \right)} = {\frac{\begin{matrix}{\Pr{\left( {x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}C_{p - m + 1}^{p - 1}} \middle| {w_{q}W_{q - n + 1}^{q - 1}} \right) \cdot}} \\{{\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)} \cdot {\Pr\left( W_{q - n + 1}^{q - 1} \right)}}\end{matrix}}{{\Pr\left( C_{p - m + 1}^{p - 1} \middle| W_{q - n + 1}^{q - 1} \right)} \cdot {\Pr\left( W_{q - n + 1}^{q - 1} \right)}} = {\quad{{\left\lbrack \frac{\Pr\left( {x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}C_{p - m + 1}^{p - 1}} \middle| {w_{q}W_{q - n + 1}^{q - 1}} \right)}{\Pr\left( C_{p - m + 1}^{p - 1} \middle| W_{q - n + 1}^{q - 1} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}} = {\quad{{\left\lbrack \frac{\Pr\left( {x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}C_{p - m + 1}^{p - 1}} \middle| {w_{q}W_{q - n + 1}^{q - 1}} \right)}{\Pr\left( C_{p - m + 1}^{p - 1} \middle| W_{q - n + 1}^{q - 1} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}} = {\quad{\left\lbrack \frac{\begin{matrix}{{\Pr\left( {x_{1}\mspace{14mu}\ldots\mspace{14mu} x_{k}} \middle| {C_{p - m + 1}^{p - 1}w_{q}W_{q - n + 1}^{q - 1}} \right)} \cdot} \\{\Pr\left( C_{p - m + 1}^{p - 1} \middle| {w_{q}W_{q - n + 1}^{q - 1}} \right)}\end{matrix}}{\Pr\left( C_{m + 1}^{p - 1} \middle| W_{q - n + 1}^{q - 1} \right)} \right\rbrack \cdot {{\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}.}}}}}}}}}} & (4)\end{matrix}$The resulting expression (4) can thus include the standard n-gramprobability Pr(w_(q)|W_(q−n+1) ^(q−1)) of expression (1), multiplied bythe expression in square brackets, which can act as a weight on thisn-gram probability. It should be appreciated that the above derivationcan be achieved without approximation.

Notably, in expression (4), the term Pr(C_(p−m+1) ^(p−1)|w_(q)W_(q−n+1)^(q−1)) involves the character history conditioned on both the wordhistory and the current word, which introduces a non-causal dependenceon future events. Dropping this non-causal dependence can be a very mildassumption and modification. As a result, this term can be simplified toPr(C_(p−m+1) ^(p−1)|W_(q−n+1) ^(q−1)), which can then cancel with thedenominator to yield the following:Pr(w_(q)x₁ . . . x_(k)|W_(q−n+1) ^(q−1)C_(p−m+1) ^(p−1))≈Pr(x₁ . . .x_(k)|C_(p−m+1) ^(p−1)w_(q)W_(q−n+1) ^(q−1))·Pr(w_(q)|W_(q=n+1) ^(q−1))  (5)The weight on the standard n-gram probability thus reduces to Pr(x₁ . .. x_(k)|C_(p−m+1) ^(p−1)w_(q)W_(q−n+1) ^(q−1)), which represents theprobability of the partial character expansion of the current wordconditioned on the current word itself, as well as both the characterhistory and the word history.

It should be appreciated that there can be redundancy in thisconditioning, as character history and word history can overlapsignificantly. Whether character history or word history provides moreinformation can depend on the respective values of m and n. In oneexample, it can be assumed that m can be large enough relative to n toprovide a meaningful representation of the relevant history. In such anexample, knowledge of the character history can be sufficient, and theprecise identity of the words may not be necessary. This can provide asimplification of the weighting element to Pr(x₁ . . . x_(k)|C_(p−m+1)^(p−1)w_(q)), which, using Bayes' rule, can in turn be written asfollows:

$\begin{matrix}{{\Pr\left( {x_{1}\ldots\mspace{14mu} x_{k}} \middle| {C_{p - m + 1}^{p - 1}w_{q}} \right)} = {\frac{{\Pr\left( w_{q} \middle| {x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{k}C_{p - m + 1}^{p - 1}} \right)} \cdot {\Pr\left( {x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{k}} \middle| C_{p - m + 1}^{p - 1} \right)}}{\Pr\left( w_{q} \right)}.}} & (6)\end{matrix}$Expression (6) exposes the probability Pr(x₁ . . . x_(k)|C_(p−m+1)^(p−1)), which can be computed with the standard character m-gram. Forexample, the standard character m-gram can be computed according to thefollowing:Pr(x ₁ . . . x _(k) |C _(p−m+1) ^(p−1))=Pr(x _(k) |x ₁ . . . x _(k−1) C_(p−m+1) ^(p−1)) . . . Pr(x ₂ |x ₁ C _(p−m+1) ^(p−1))·Pr(x ₁ |C _(p−,+1)^(p−1))≈Pr(x _(k) |x ₁ . . . x _(k−1) C _(p−m+k) ^(p−1)) . . . Pr(x ₂ |x₁ C _(p−m+2) ^(p−1))·Pr(x ₁ |C _(p−m+1) ^(p−1)),   (7)where the approximation on the second line in expression (7) properlytakes into account the fixed value of the character span m.

In one example, a further approximation can be employed for theprobability Pr(w_(q)|x₁ . . . x_(k)C_(p−m+1) ^(p−1)), which predicts thecurrent word based on the partial character expansion and the characterhistory. Given that the character history can already be used to predictthe partial expansion in expression (7), it can be a relatively mildmodification to focus on the dependence of the current word on thepartial character expansion. With such an approximation, thisprobability can be reduced as follows:Pr(w_(q)|x₁ . . . x_(k)C_(p−m+1) ^(p−1))≈Pr(w_(q)|x₁ . . . x_(k)).   (8)In essence, this approximation policy can be consistent with the typicalassumption made in class m-grams, which decouples word assignment fromclass m-gram calculations. Similarly here, the relationship between wordand partial character expansion (“word assignment”) can be decoupledfrom the character m-gram calculations.

With this decoupling analogy, the probability Pr(w_(q)|x₁ . . . x_(k))can be computed by leveraging the words in the vocabulary whose first kcharacters are x₁ . . . x_(k). For reference, the set of words in thevocabulary whose first k characters are x₁ . . . x_(k) can be denoted byV_(x) ₁ _(. . . x) _(k) . With this notation and simplification, thisprobability can be determined according to

${{\Pr\left( w_{q} \middle| {x_{1}\ldots\mspace{14mu} x_{k}} \right)} = {\frac{1}{V_{x_{1}\ldots\mspace{14mu} x_{k}}}{\sum\limits_{w \in V_{x_{1}\ldots\mspace{14mu} x_{k}}}\;{\Pr(w)}}}},$e.g., the prediction for the current word can be determined as theaverage unigram probability computed over the set of words in thevocabulary whose first k characters are x₁ . . . x_(k).

The previous derivations and approximations can further be combined tomodify expression (5) to arrive at the following:

$\begin{matrix}{{\Pr\left( {w_{q}x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{k}} \middle| {W_{q - n + 1}^{q - 1}C_{p - m + 1}^{p - 1}} \right)} \approx {\quad{{\left\lbrack \frac{{\Pr\left( w_{q} \middle| {x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{k}} \right)} \cdot {\Pr\left( {x_{1}\ldots\mspace{14mu} x_{k}} \middle| C_{p - m + 1}^{p - 1} \right)}}{\Pr\left( w_{q} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}} \approx {\quad{{\left\lbrack \frac{\left( {\frac{1}{V_{x_{1}\ldots\mspace{14mu} x_{k}}}{\sum\limits_{w \in V_{x_{1}\ldots\mspace{14mu} x_{k}}}\;{\Pr(w)}}} \right) \cdot {\prod\limits_{i = 1}^{k}\;{\Pr\left( x_{i} \middle| {x_{1}\;\ldots\mspace{14mu} x_{i - 1}C_{p - m + i}^{p - 1}} \right)}}}{\Pr\left( w_{q} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}},}}}}} & (9)\end{matrix}$with the convention that x₀ can be the empty string.

Expression (9) can be interpreted as an enhanced word n-gramincorporating intelligence from a character m-gram relative to abaseline word unigram containing no character information. The standardword n-gram probability can be weighted using character information. Forexample, if the character m-gram model predicts the current word with ahigher probability than would have been predicted using only (word)unigram information, the standard word n-gram probability can be boostedaccordingly. If, on the other hand, the word unigram model predicts thecurrent word with a higher probability than the character m-gram model,the word n-gram probability can be reduced accordingly.

Referring back to process 200 of FIG. 2, in one example, expression (9)can be used at block 208 to determine an integrated probability of thepredicted word based on the probability of the predicted character. Inparticular, expression (9) can utilize the probability of predictedwords from a word n-gram model based on previously entered words, as atblock 204 of process 200. In addition, expression (9) can utilize theprobability of predicted characters from a character m-gram model basedon previously entered characters, as at block 206 of process 200. Atblock 208, these probabilities can be combined as in expression (9) toproduce an integrated probability of predicted words based onprobabilities of predicted characters. It should be appreciated thatother weighting effects are possible that combine the word n-gram modeland character m-gram model in a similar fashion.

It should be appreciated that this weighting operation can be donespecifically based on the local context observed (as opposed to a globalweighting as in, for example, linear interpolation). In particular, inthe case of a frequently observed word, the unigram probability can tendto be large, thus limiting the influence of the character m-gram modelin favor of the word n-gram model. On the other hand, in the case of anunseen or rarely observed word, the unigram probability can tend to besmall, and the character m-gram model can thus be given comparativelymore importance.

Referring again to process 200 of FIG. 2, at block 210, the predictedword can be displayed based on the integrated probability determined atblock 208 (e.g., based on integrated probabilities produced fromexpression (9) or a similar weighting function). In one example,integrated probabilities for a set of candidate words can be determinedas at blocks 204, 206, and 208. In response to one or more of thoseintegrated probabilities exceeding a threshold, the correspondingcandidate words can be displayed for a user as predicted words. In someexamples, such a threshold can be determined empirically. A user canselect a displayed predicted word or phrase, and the selected word orphrase can be entered as text input in its entirety without the userhaving to manually enter each of the characters making up the word orphrase.

If it is determined that a predicted word should not yet be displayed atblock 210 (e.g., if no integrated probability exceeds a predeterminedthreshold and/or a reduction in entropy fails to exceed a predeterminedthreshold as discussed in further detail below), process 200 cancontinue at block 202 awaiting further input from a user. For example,blocks 202, 204, 206, and 208 can be repeated with the addition of eachnew character entered by a user, and a determination can be made foreach new character whether a predicted word should be displayed based onnewly determined integrated probabilities of candidate words.

FIG. 3 illustrates such recalculation at time 352 after two-characterpartial expansion of the current word (e.g., k=3). As shown, by time352, two additional characters x₁ and x₂ have been revealed since time350 (e.g., these characters were entered by the user since time 350). Inone example, the inputs to character language model 336 can be updatedas shown to include the newly added characters x₁ and x₂ and likewise toexclude characters c_(p−m+1) and c_(p−m+2) as these characters may havefallen outside the relevant character history length m. The currentcharacter of interest then becomes x₃. In one example, the set ofcandidate words for predicted word 342 can be constrained to only thosewords beginning with x₁x₂. The analysis in process 200 can be updatedgiven the newly revealed characters and word constraints, yieldingupdated integrated probabilities of candidate words. In response tothose updated integrated probabilities exceeding a threshold (and/or inresponse to a significant reduction in entropy as discussed below), apredicted word can be displayed at block 210 of process 200 (orpreviously displayed word predictions can be updated based on theupdated integrated probabilities).

It should be appreciated that process 200 of FIG. 2 and the observedcontext and prediction of FIG. 3 are illustrative examples, and variousmodifications will be apparent to those of ordinary skill in the art.For example, it should be understood that, although separated out intothree different blocks in FIG. 2, blocks 204, 206, and 208 can becombined into a single function (e.g., as in expression (9)). Variousother modifications are also possible.

FIG. 4 illustrates exemplary process 400 for determining word predictioncandidates to be displayed based on prediction set entropies. Forexample, process 400 can be used in conjunction with process 200 of FIG.2 to determine whether candidate words should be displayed to a user(e.g., to determine whether candidate words have sufficient predictivevalue that they should be surfaced to a user and occupy screen realestate). Process 400 can also be used in conjunction with other wordprediction approaches to determine whether word prediction candidatesshould be displayed. In one example, process 400 can be executed onprocessor 104 of system 100 discussed above with reference to FIG. 1.

At block 402, a first typed character can be received from a user. Thecharacter can be received in any of a variety of ways, such as fromkeyboard 116 in system 100 discussed above. The user-entered characterreceived at block 402 can be directed to any type of text entryinterface or environment on a user device. For example, such aninterface could be configured for typing text messages, emails, webaddresses, documents, presentations, search queries, media selections,commands, form data, calendar entries, notes, or the like. The characterreceived at block 402 can be used to predict a word. For example, thereceived character can be used in process 200 discussed above or in anyother word prediction process.

At block 404, a first entropy of a first set of possible wordcompletions can be determined. In a typical word prediction process(such as process 200 discussed above), the number of possible wordcompletions or prediction candidates at any given point can be limitedby the number of words in the vocabulary that satisfy the currentconstraints imposed by already-entered text (e.g., constraining the setof possible word completions to words with a given prefix of kcharacters). For example, at block 404, the first set of possible wordcompletions can uniformly include the first typed character from block402 as part of a prefix, as all other candidates failing to satisfy thiscondition could have been removed as candidates. In some instances, theconstrained set can still tend to be too large to provide a significantlevel of confidence for surfacing prediction results to the user (e.g.,displaying results). As discussed in further detail below, a measure ofentropy of the possible completions can be used to decide when topresent word predictions to the user. A variety of different entropycalculations can be used. In one example, an entropy calculation as inexpression (10) below can be used.

At block 406, a second typed character can be received from the user. Atblock 408, a second entropy of a second set of possible word completionscan be determined. As at block 404, the entropy can be determined in anyof a variety of ways, including according to expression (10) discussedbelow. In one example, the second set of possible word completions canuniformly include both the first typed character from block 402 and thesecond typed character from block 406 in succession as part of a prefix.The second set of possible word completions can thus be a subset of thefirst set of possible word completions (e.g., candidate words having aprefix of the first and second typed characters can likely be a subsetof candidate words having a prefix of the first typed character). Theaddition of the second typed character can thus limit the set ofpredicted word candidates, as only a subset of previously predictedcandidates is likely to include the second typed character.

At block 410, a reduction in entropy can be determined from the firstentropy at block 404 to the second entropy at block 408. In other words,using entropy as a measurement, the relative change in the predictionset due to the addition of the second character at block 406 can bedetermined. This can signify the amount of information that was revealedby the addition of the second character. For example, in some instances,the addition of a character may not reveal much information and may notsignificantly limit the set of possible word completions. In otherinstances, however, the addition of a character may significantly reducethe set of possible word completions, meaning the additional characterprovided significant predictive value. The reduction in entropy value atblock 410 can thus represent the comparative strength of the currentword prediction set.

At block 412, a determination can be made as to whether the entropyreduction determined at block 410 exceeds a threshold. In some examples,such a threshold can be tuned empirically for particular applications.In addition, in some examples, the threshold can change depending on thelength of the existing known prefix (e.g., a first threshold when nocharacters are known, a second threshold when one character is known, athird threshold when two characters are known, etc.).

If the entropy reduction exceeds the relevant threshold (the “yes”branch), at block 416, a candidate word can be caused to be displayedfrom the second set of possible word completions. In some examples,multiple candidate words from the second set can be displayed accordingto their probability. For example, the top three candidates having thehighest probability can be displayed. In other examples, a wordprobability threshold can be applied, and only the top candidates havinga probability above the word probability threshold can be displayed (ora subset given space constraints, maximum word prediction constraints,user preference, or the like). It should be appreciated that thedisplayed candidates can have significant predictive value for the usergiven that the entropy reduction threshold can limit word predictionintrusion until the set of possible word completions is deemed to havebeen sufficiently limited. This entropy-derived limitation can thusprovide a desirable user experience where intrusion intofrequently-limited screen real estate can be reserved for candidateswith high predictive value.

If, however, the entropy reduction does not exceed the relevantthreshold (the “no” branch), at block 414, an entropy reductiondetermination can be repeated for each new character that is revealeduntil the threshold is met, at which point a candidate word or words canbe displayed as in block 416. In this manner, the entropy reductiondetermination can be successively applied as new characters are revealedto strategically determine at which point word prediction candidatesshould be surfaced and displayed to a user from the set of possible wordcompletions.

In some examples, process 400 can be modified or employed differentlydepending on where the current character of interest is positionedcompared to a word boundary. For example, at a word boundary (e.g.,after a space), prediction candidates can be displayed without regard toentropy calculations. After a character is revealed, entropy reductioncan be determined compared to the candidate set at the word boundary,and the determination at block 412 can proceed as discussed above. Inthis example, the space between words can be considered the first typedcharacter at block 402, and the revealed character of the word can beconsidered the second typed character at block 406.

It should be understood that, in some examples, the explicit entropycalculations described with reference to blocks 404 and 408 can beexcluded, and an entropy reduction can be determined at block 410 inother ways. For example, as described below with reference to expression(17), entropy reduction can be determined based on the possible wordcompletions that are eliminated upon the addition of a character.

For explanation purposes, the following expressions reference thevariables and expressions discussed above for process 200. Likevariables and expressions can be assumed to be the same. It should beappreciated, however, that the concepts of entropy reductioncalculations discussed herein need not be restricted to the wordprediction discussed with regard to process 200 above, and one ofordinary skill in the art will be able to apply these concepts to otherword prediction mechanisms.

For reference, P_(k)(w_(q)) can denote the joint probability Pr(w_(q)x₁. . . x_(k)|W_(q−n+1) ^(q−1)C_(p−m+1) ^(p−1)), with a k-characterpartial expansion (e.g., k characters have been revealed so far for thecurrent word of interest). The entropy H of the set of possiblecompletions given a k-character partial expansion can be described asfollows:

$\begin{matrix}{H_{k} = {- {\sum\limits_{w_{q} \in V_{x_{1}\ldots\mspace{14mu} x_{k}}}\;{{P_{k}\left( w_{q} \right)}\log\mspace{11mu}{{P_{k}\left( w_{q} \right)}.}}}}} & (10)\end{matrix}$As noted above, the expression V_(x) ₁ _(. . . x) _(k) can represent theset of words in the vocabulary whose first k characters are x₁ . . .x_(k). The entropy summation can thus include all candidate words w_(q)in the vocabulary whose first k characters are x₁ . . . x_(k). NowP_(k+1)(w_(q)) can denote the same joint probability when anothercharacter has been observed (e.g., a new character beyond k). Inparticular, with the newly-observed character x_(k+1), the jointprobability can be expressed as Pr(w_(q)x₁ . . . x_(k)x_(k+1)|W_(q−n+1)^(q−1)C_(p−m+1) ^(p−1)). The entropy of the set of possible completionsgiven the additional character x_(k+1) can become:

$\begin{matrix}{{H_{k + 1} = {- {\sum\limits_{w_{q} \in {V_{x_{1}}\ldots\mspace{14mu} x_{k}x_{k + 1}}}\;{{P_{k + 1}\left( w_{q} \right)}\log\;{P_{k + 1}\left( w_{q} \right)}}}}},} & (11)\end{matrix}$where normally |V_(x) ₁ _(. . . x) _(k) _(x) _(k+1) |«|V_(x) ₁_(. . . x) _(k) | (e.g., the set of words in the vocabulary whose firstk characters are x₁ . . . x_(k)x_(k+1) can typically be much smallerthan the set of words in the vocabulary whose first k characters are x₁. . . x_(k)).

Referring back to expression (9) for an enhanced word n-gramincorporating intelligence from a character m-gram relative to abaseline word unigram containing no character information, and becauseall other terms cancel out, the following ratio can be derived:

$\begin{matrix}{\frac{P_{k + 1}\left( w_{q} \right)}{P_{k}\left( w_{q} \right)} = {\frac{\begin{matrix}{\left( {\frac{1}{V_{x_{1}\ldots\mspace{14mu} x_{k}x_{k + 1}}}{\sum\limits_{w \in V_{x_{1}\ldots\mspace{14mu} x_{k}x_{k + 1}}}\;{\Pr(w)}}} \right) \cdot} \\{\prod\limits_{i = 1}^{k + 1}\;{\Pr\left( x_{i} \middle| {x_{1}\ldots\mspace{14mu} x_{i - 1}C_{p - m + i}^{p - 1}} \right)}}\end{matrix}}{\begin{matrix}{\left( {\frac{1}{V_{x_{1}\ldots\mspace{14mu} x_{k}}}{\sum\limits_{w \in V_{x_{1}\ldots\mspace{14mu} x_{k}}}\;{\Pr(w)}}} \right) \cdot} \\{\prod\limits_{i = 1}^{k}\;{\Pr\left( x_{i} \middle| {x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{i - 1}C_{p - m + i}^{p - 1}} \right)}}\end{matrix}}.}} & (12)\end{matrix}$In some examples, the average unigram probability may not varysignificantly with the addition of one more character in most instances.In addition, the order of the character m-gram model can be assumed tobe large enough that conditioning on one extra character may not lead toappreciably different results. With these observations, in someexamples, expression (12) can be simplified to the following:

$\begin{matrix}{{\frac{P_{k + 1}\left( w_{q} \right)}{P_{k}\left( w_{q} \right)} \approx \frac{\Pr\left( x_{k + 1} \middle| {x_{1\mspace{11mu}}\ldots\mspace{14mu} x_{k}C_{p - m + k + 1}^{p - 1}} \right)}{\Pr\left( c_{p - m + k} \right)}},} & (13)\end{matrix}$where c_(p−m+k) can refer to the least recent character in them-character span ending at index k. Notably, the right-hand side ofexpression (13) can depend on the character language model only, and noton the word language model. Furthermore, while this ratio can vary withindividual values of the characters involved, on the average it can tendto be bounded around unity as denoted by the following:

$\begin{matrix}{{{{\frac{\Pr\left( x_{k + 1} \middle| {x_{1}\mspace{11mu}\ldots\mspace{14mu} x_{k}C_{p - m + k + 1}^{p - 1}} \right)}{\Pr\left( c_{p - m + k} \right)} - 1}} \leq ɛ},} & (14)\end{matrix}$where ε can be suitably “small” (e.g., zero or practically zero). Fromthis, a reasonable first-order approximation can be thatP_(k+1)(w_(q))≈P_(k)(w_(q)), which can therefore mean that expression(11) can also be expressed as follows:

$\begin{matrix}{H_{k + 1} \approx {- {\sum\limits_{w_{q} \in V_{x_{1}\ldots\mspace{14mu} x_{k}x_{k + 1}}}\;{{P_{k}\left( w_{q} \right)}\log\;{{P_{k}\left( w_{q} \right)}.}}}}} & (15)\end{matrix}$

In some examples, for further manipulation, expression (10) can berewritten as follows:

$\begin{matrix}{{H_{k} = {{- {\sum\limits_{w_{q} \in V_{x_{1}\ldots\mspace{14mu} x_{k}x_{k + 1}}}\;{{P_{k}\left( w_{q} \right)}\log\;{P_{k}\left( w_{q} \right)}}}} - {\sum\limits_{w_{q} \in V_{x_{1}\ldots\mspace{14mu} x_{k}\overset{\_}{x_{k + 1}}}}\;{{P_{k}\left( w_{q} \right)}\log\;{P_{k}\left( w_{q} \right)}}}}},} & (16)\end{matrix}$where V_(x) ₁ _(. . . x) _(k) _(x) _(k+1) can refer to the set of allwords from the vocabulary whose first k characters are x₁ . . . x_(k),but whose next character is not x_(k+1) (as expressed by the barnotation of x_(k+1) ). This can lead to a difference in entropy that canbe expressed as follows:

$\begin{matrix}{{H_{k + 1} - H_{k}} \approx {\sum\limits_{w_{q} \in V_{x_{1}\ldots\mspace{14mu} x_{k}\overset{\_}{x_{k + 1}}}}\;{{P_{k}\left( w_{q} \right)}\log\;{P_{k}\left( w_{q} \right)}}} \leq 0.} & (17)\end{matrix}$In other words, expression (17) can represent the reduction in entropythat ensues when x_(k+1) is revealed. This reduction in entropy can thusbe conveyed directly in terms of all possible completions that areeliminated upon the addition of one extra character at index (k+1). Inother words, in some examples, the reduction in entropy from theaddition of a character can be computed based on the word candidatesthat become disqualified by the revelation of the new character. Inother examples, entropy can be computed at each character addition,cached for future reference, and used to calculate reduction in entropyafter a new character is added. It should be appreciated that many othermethods for determining a reduction in entropy can be used in any of theprocesses discussed herein.

FIG. 5 illustrates exemplary process 500 for determining word predictioncandidates to be displayed based on entropy reduction. Similar toprocess 400 discussed above, process 500 demonstrates another example ofemploying entropy calculations to determine whether candidate wordsshould be displayed to a user. In one example, process 500 can be usedin conjunction with a word prediction algorithm, such as process 200 ofFIG. 2. Process 500 can be executed on processor 104 of system 100discussed above with reference to FIG. 1.

At block 502, a first typed character can be received from a user. Thecharacter can be received in any of a variety of ways, such as fromkeyboard 116 in system 100 discussed above. The user-entered characterreceived at block 502 can be directed to any type of text entryinterface or environment on a user device. For example, such aninterface could be configured for typing text messages, emails, webaddresses, documents, presentations, search queries, media selections,commands, form data, calendar entries, notes, or the like. The characterreceived at block 502 can be used to predict a word. For example, thereceived character can be used in process 200 discussed above or in anyother word prediction process.

At block 504, first probabilities of a first set of possible wordcompletions can be determined based on the first typed characterreceived at block 502. For example, a word prediction process, such asprocess 200 discussed above, can be employed to determine theprobability that candidate words complete the user's desired text entry(e.g., correspond to the user's eventual desired word). In one example,expression (9) discussed above can be used to determine theseprobabilities given the available word and character history (includingthe first typed character from block 502). In particular, a standardword n-gram probability can be integrated with observed characterinformation to arrive at the first probabilities of the first set ofpossible word completions. It should be appreciated that the first setof possible word completions can be limited to words in the vocabularyhaving a prefix that includes the first typed character from block 502.

At block 506, a second typed character can be received from the user. Atblock 508, second probabilities of a second set of possible wordcompletions can be determined based on both the first typed characterfrom block 502 and the second typed character from block 506. As atblock 504, a word prediction process, such as process 200 discussedabove, can be employed to determine the second probabilities of thesecond set of possible word completions. In some examples, the wordprediction process can be employed to narrow the first set of possibleword completions based on the second typed character to arrive at thesecond set of possible word completions. For example, the firstcharacter from block 502 and the second character from block 506 candefine at least a part of a prefix of a user's desired word. The secondset of possible word completions can thus be a subset of the first setof possible word completions at block 504 given the revelation of thesecond typed character limiting candidate words to those having prefixesincluding both the first and second typed characters. The addition ofthe second typed character can thus limit the set of predicted wordcandidates, as only a subset of previously predicted candidates islikely to include the second typed character in addition to the first.

At block 510, a reduction in entropy from the first probabilities of thefirst set to the second probabilities of the second set can bedetermined. For example, a reduction in entropy can be determined asdescribed above with reference to expression (17) based on the possibleword completions that are eliminated upon the addition of a character.In particular, reduction in entropy can be determined based on theprobabilities that are disqualified from the first set of block 504 inarriving at the second set of block 508 based on the revelation of thesecond typed character at block 506. In another example, entropyreduction can be determined by calculating the entropy (e.g., accordingto expression (10) discussed above) of the first probabilities of thefirst set from block 504, calculating the entropy of the secondprobabilities of the second set from block 508, and determining thereduction in entropy from the first to the second by taking thedifference. In still other examples, entropy reduction can be determinedin any of a variety of other ways.

Notably, according to the examples discussed herein, entropy can be usedas a measurement of the relative change in the prediction set due to theaddition of the second character at block 506. This can signify theamount of information that was revealed by the addition of the secondcharacter. For example, in some instances, the addition of a charactermay not reveal much information and may not significantly limit theentropy of the first probabilities of the first set of possible wordcompletions. In other instances, however, the addition of a charactermay significantly reduce the entropy of the first probabilities of thefirst set of possible word completions, meaning the additional characterprovided significant predictive value. The reduction in entropy value atblock 510 can thus represent the comparative strength of the currentword prediction set.

At block 512, a determination can be made as to whether the entropyreduction determined at block 510 exceeds a threshold. In some examples,such a threshold can be tuned empirically for particular applications.In addition, in some examples, the threshold can change depending on thelength of the existing known prefix (e.g., a first threshold when nocharacters are known, a second threshold when one character is known, athird threshold when two characters are known, etc.).

If the entropy reduction exceeds the relevant threshold (the “yes”branch), at block 516, a candidate word can be caused to be displayedfrom the second set of possible word completions. In some examples,multiple candidate words from the second set can be displayed accordingto their probability. For example, the top three candidates having thehighest probability can be displayed. In other examples, a wordprobability threshold can be applied, and only the top candidates havinga probability above the word probability threshold can be displayed (ora subset given space constraints, maximum word prediction constraints,user preference, or the like). It should be appreciated that thedisplayed candidates can have significant predictive value for the usergiven that the entropy reduction threshold can limit word predictionintrusion until the set of possible word completions is deemed to havebeen sufficiently limited. This entropy-derived limitation can thusprovide a desirable user experience where intrusion intofrequently-limited screen real estate can be reserved for candidateswith high predictive value.

If, however, the entropy reduction does not exceed the relevantthreshold (the “no” branch), at block 514, an entropy reductiondetermination can be repeated for each new character that is revealeduntil the threshold is met, at which point a candidate word or words canbe displayed as in block 516. In this manner, the entropy reductiondetermination can be successively applied as new characters are revealedto strategically determine at which point word prediction candidatesshould be surfaced and displayed to a user from the set of possible wordcompletions.

In some examples, process 500 can be modified or employed differentlydepending on where the current character of interest is positionedcompared to a word boundary. For example, at a word boundary (e.g.,after a space), prediction candidates can be displayed without regard toentropy calculations. After a character is revealed, entropy reductioncan be determined compared to the candidate set at the word boundary,and the determination at block 512 can proceed as discussed above. Inthis example, the space between words can be considered the first typedcharacter at block 502, and the revealed character of the word can beconsidered the second typed character at block 506.

FIG. 6 illustrates exemplary process 600 for predicting words anddisplaying them according to entropy reduction. For reference, variablesand expressions are used that are similar to those discussed above, andthe concepts discussed above can be applied similarly in this example.Likewise, the concepts and particular examples described for process 600can be applied to any of the processes discussed herein. For purposes ofprocess 600, however, as compared to expression (17) derived above, letk correspond to the current character, and k−1 correspond to theprevious character, such that the relevant entropy reduction equationcan be rewritten as H_(k)−H_(k−1). One of ordinary skill in the art willunderstand that the calculations can be equivalent, and the notationscan simply be changed for referential simplicity (e.g., referring to thecurrent and previous characters as opposed to the current and nextcharacters).

At block 602, at a word boundary (e.g., as at time 350 in FIG. 3, afterreceiving a space character, or the like), a list of most likely nextwords can be displayed based on a word n-gram model. For example, themost likely next words can be determined according to the integratedmodel discussed above with reference to process 200. At the wordboundary, in this example, k=0. Referring to expression (3) above, givenk=0 (e.g., there is no partial character expansion yet observed), thejoint probability of the current word w_(q) and the null partialcharacter expansion can simplify to the following:Pr(W_(q)|W_(q−n+1) ^(q−1)C_(p−m+1) ^(p−1))≈Pr(w_(q)|W_(q−n+1) ^(q−1)),  (18)which in practice can reduce to the word n-gram noted at block 602 inFIG. 6. A word n-gram model can thus provide an initial set of wordpredictions at the word boundary. In one example, a predetermined numberof words having the highest likelihoods can be displayed. In anotherexample, a subset of candidate words having likelihoods above apredetermined threshold can be displayed.

At block 604, the variable k can be given an initial value of 1 as afirst character x₁ of the next word is received from a user. At block606, sets V_(x) ₁ _(. . . x) _(k) and V_(x) ₁ _(. . .) _(x) _(k) can bedetermined. In particular, the set of words in the vocabulary beginningwith revealed characters x₁ . . . x_(k) can be determined, and the setof words in the vocabulary that have been disqualified for failing tobegin with revealed characters x₁ . . . x_(k) can be determined. At thispoint in this example, given the first character x₁, these sets caninclude V_(x) ₁ , in which all words begin with x₁, and set V _(x) ₁ ,in which all words do not begin with x₁.

At block 608, the integrated probability P_(k) can be computed alongwith the entropy reduction H_(k)−H_(k−1). For example, given therevealed characters, the integrated probability P_(k) can be computedaccording to expression (9) discussed above. In particular, theintegrated probability can include an enhanced word n-gram incorporatingintelligence from a character m-gram relative to a baseline word unigramcontaining no character information. At this point in this example,given the first character x₁, the integrated probability can be computedas follows:

$\begin{matrix}{{{P_{1}\left( w_{q} \right)} = {\left\lbrack \frac{\left( {\frac{1}{V_{x_{1}}}{\sum\limits_{w \in V_{x_{1}}}\;{\Pr(w)}}} \right) \cdot {\Pr\left( x_{1} \middle| C_{p - m + 1}^{p - 1} \right)}}{\Pr\left( w_{q} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}}},} & (19)\end{matrix}$where V_(x) ₁ can be the set of words in the vocabulary that start withx₁.

At this point in this example, the entropy reduction H_(k)−H_(k−1) canbe computed using the value obtained from expression (19) as follows:

$\begin{matrix}{{{H_{1} - H_{0}} = {\sum\limits_{w_{q} \in V_{\overset{\_}{x_{1}}}}\;{{P_{1}\left( w_{q} \right)}\log\;{P_{1}\left( w_{q} \right)}}}},} & (20)\end{matrix}$where V _(x) ₁ can be the set of words in the vocabulary that do notstart with x₁.

At block 610, it can be determined whether H_(k)−H_(k−1) is greater thana threshold. For example, the result from block 608 can be compared toan empirically tuned threshold θ₁. If the entropy reduction is highenough (H₁−H₀>θ₁, the “yes” branch), the top candidates starting with x₁can be displayed at block 612 based on the substantial reduction inentropy. Otherwise, in some examples, no candidates can be displayedbased on the theory that character x₁ may not have offered enoughinformation to present meaningful completions to the user. At the “no”branch, the index k can be incremented at block 616, and the process cancontinue at block 606 as shown.

Assuming in this example that k was incremented at block 616, a secondcharacter x₂ can be received from the user. Returning to block 606,given the received characters x₁x₂, set V_(x) ₁ _(x) ₂ can bedetermined, in which all words begin with x₁x₂, and set V _(x) ₁ _(x) ₂can be determined, in which all words do not begin with x₁x₂. At block608, the integrated probability P_(k) can be computed along with theentropy reduction H_(k)−H_(k−1). In particular, given the charactersx₁x₂, the integrated probability can be computed as follows:

$\begin{matrix}{{{P_{2}\left( w_{q} \right)} = {\left\lbrack \frac{\begin{matrix}{\left( {\frac{1}{V_{x_{1}x_{2}}}{\sum\limits_{w \in V_{x_{1}x_{2}}}\;{\Pr(w)}}} \right) \cdot} \\{{\Pr\left( x_{2} \middle| {x_{1}C_{p - m + 2}^{p - 1}} \right)} \cdot {\Pr\left( x_{1} \middle| C_{p - m + 1}^{p - 1} \right)}}\end{matrix}}{\Pr\left( w_{q} \right)} \right\rbrack \cdot {\Pr\left( w_{q} \middle| W_{q - n + 1}^{q - 1} \right)}}},} & (21)\end{matrix}$where V_(x) ₁ _(x) ₂ can be the set of words in the vocabulary thatstart with x₁x₂.

At this point in this example, the entropy reduction H_(k)−H_(k−1) canbe computed using the value obtained from expression (21) as follows:

$\begin{matrix}{{{H_{2} - H_{1}} = {\sum\limits_{w_{q} \in V_{x_{1}\overset{\_}{x_{2}}}}\;{{P_{2}\left( w_{q} \right)}\log\mspace{11mu}{P_{2}\left( w_{q} \right)}}}},} & (22)\end{matrix}$where V_(x) ₁ _(x) ₂ can be the set of words in the vocabulary thatstart with x₁ but do not contain x₂ as the second character followingx₁.

At block 610, it can be determined whether H₂−H₁ is greater than anotherempirically tuned threshold θ₂. If the entropy reduction is high enough(H₂−H₁>θ₂, the “yes” branch), the top candidates starting with x₁x₂ canbe displayed at block 612 based on the substantial reduction in entropy.Otherwise, in some examples, no candidates can be displayed based on thetheory that characters x₁x₂ still may not have offered enoughinformation to present meaningful completions to the user. At the “no”branch, the index k can be incremented again at block 616, and theprocess can continue again at block 606 awaiting receipt of the thirdcharacter from the user, and so on.

Returning to the situations in which top candidates are displayed atblock 612, at block 614, a determination can be made as to whether asuggestion has been accepted. In other words, it can be determinedwhether a user accepts and selects one of the top candidates displayedat block 612. If no suggestion is accepted (the “no” branch), theprocess can continue by anticipating a new character will be entered:the index k can be incremented at block 616 and the process can returnto block 606 upon receipt of the next character.

If a suggestion is accepted (the “yes” branch), the selected word can beentered into the typing interface and the process can continue with thenext word: the process can return to block 602 and display a list ofmost likely next words based on a word n-gram model, taking into accountthe suggestion just accepted at block 614. In other examples, receipt ofa space character can similarly restart the process at block 602, takinginto account the word entered prior to the space character. Likewise,receipt of other symbols and characters signifying the completion of aword can restart the process at block 602 (e.g., periods, commas,semi-colons, colons, question marks, exclamation points, or the like).

By employing an entropy reduction threshold as with process 600 andother processes discussed herein, the user experience can be improvedas, in some examples, only high-value suggestions can be presented tothe user. This can also include the attendant benefit that the user neednot monitor tentative predictions after each character, but only when itis deemed to be truly worth it. This in turn can enhance both text inputspeed and user experience.

FIG. 7 illustrates exemplary process 700 for predicting and displayingwords by combining a word n-gram language model and a character m-gramlanguage model and displaying results according to entropy reduction. Insome examples, process 700 can be performed in a similar manner asprocess 600 described above. Process 700 can combine word predictionprocess 200 described above with any of the entropy reduction thresholdsdiscussed herein.

At block 702, typed input can be received from a user. Typed input canbe received in any of a variety of ways, such as from keyboard 116 insystem 100 discussed above. The typed input can be directed to any typeof text entry interface, and can include any form of text.

At block 704, a word n-gram model can be used to determine probabilitiesof predicted words based on previously entered words. For example, aword n-gram model as discussed above with reference to expression (1)and word n-gram language model 110 of FIG. 1 can be used to determinethe probability of a candidate word given available word history. Thiscan occur, for example, at a word boundary before any characters areknown for a subsequent word (e.g., after a space, period, or otherbreak). In some examples, these probabilities can be used to causepredicted words to be displayed to a user based on the wordprobabilities (e.g., displaying top candidates).

In other examples where prefix characters for the current word may beknown, the word n-gram model can be used in conjunction with a characterm-gram model to predict word completions. For example, at block 706, acharacter m-gram model can be used to determine probabilities ofpredicted characters based on previously entered characters (e.g., basedon one or more prefix characters of the pertinent word). A characterm-gram model as discussed above with reference to expression (2) andcharacter m-gram language model 112 of FIG. 1 can be used to determinethe probability of a candidate character given available characterhistory (e.g., given one or more prefix characters).

At block 708, integrated probabilities of predicted words can bedetermined based on probabilities of predicted characters. In oneexample, the probabilities from blocks 704 and 706 can be combined: wordprobabilities from block 704 can be integrated with correspondingcharacter probabilities from block 706 (e.g., adding weight to wordswith prefixes matching likely character predictions, and removing weightfrom words with prefixes that diverge from likely characterpredictions). In another example, blocks 704, 706, and 708 can becombined in a single function that provides a word n-gram modelprobability integrated with character information, as from a characterm-gram model. For example, expression (9) discussed above can be used todetermine integrated probabilities of predicted words based on predictedcharacters. In particular, expression (9) can be used as an enhancedword n-gram incorporating intelligence from a character m-gram relativeto a baseline word unigram containing no character information.

At block 710, a reduction in entropy can be determined from previousintegrated probabilities to current integrated probabilities. In oneexample, the entropy of the previous integrated probabilities can bedetermined using the set of predicted words and their associatedintegrated probabilities prior to receipt of the most recent character(e.g., prior to the most recent typed input from the user at block 702).The entropy of the current integrated probabilities can be determinedusing the set of predicted words and their associated probabilitiesafter having been updated based on receipt of the most recent character(e.g., after receiving the most recent typed input from the user atblock 702). Entropies can be calculated, for example, as discussed abovewith regard to expression (10), or using any other method. The reductionin entropy can then be determined from the difference in thesecalculations.

In another example, a reduction in entropy from previous integratedprobabilities to current integrated probabilities can be determined atblock 710 based on the set of predicted words that became disqualifiedbased on receipt of the most recent character at block 702. For example,a reduction in entropy based on receipt of the most recent character canbe determined according to expression (17) discussed above.

At block 712, a determination can be made as to whether the entropyreduction determined at block 710 exceeds a threshold. In some examples,such a threshold can be tuned empirically for particular applications.In addition, in some examples, the threshold can change depending on thelength of the existing known prefix (e.g., a first threshold when nocharacters are known, a second threshold when one character is known, athird threshold when two characters are known, etc.).

If the entropy reduction exceeds the relevant threshold (the “yes”branch), at block 714, predicted words can be caused to be displayed. Insome examples, multiple predicted words can be displayed according totheir integrated probabilities. For example, the top three candidateshaving the highest probabilities can be displayed. In other examples, aword probability threshold can be applied, and only the top candidateshaving a probability above the word probability threshold can bedisplayed (or a subset given space constraints, maximum word predictionconstraints, user preference, or the like). It should be appreciatedthat the displayed predicted words can have significant predictive valuefor the user, given that the entropy reduction threshold can limit wordprediction intrusion until the set of predicted words is deemed to havebeen sufficiently limited. This entropy-derived limitation can thusprovide a desirable user experience where intrusion intofrequently-limited screen real estate can be reserved for predictedwords with high value.

If, however, the entropy reduction does not exceed the relevantthreshold at block 712 (the “no” branch), process 700 can return toblock 702 to await further input from the user. For example, if entropyof a current prediction set is still too large, displaying predictedwords can be delayed until further input is received and more confidenceis garnered in a narrower result set. In particular, process 700 canreturn to block 702 to receive another character from the user. The newcharacter can be used to update the probabilities of blocks 704, 706,and 708 as discussed above. Given the updated results and likelynarrower result set, entropy reduction can again be determined at block710, and a determination at block 712 can again be made as to whetherthe entropy reduction satisfies the relevant threshold. In someexamples, the relevant entropy reduction threshold on a subsequent passthrough process 700 can be different than in a prior iteration (e.g.,differing based on the number of characters that have been revealed forthe pertinent word). The process can then be repeated, for example,until the relevant threshold is met, at which point predicted words canbe caused to be displayed at block 714 as discussed above.

In any of the various examples discussed herein, language models can bepersonalized for a particular user. For example, word n-gram languagemodels and character m-gram language models discussed herein can betrained on user-specific information or modified according to userpreferences, contacts, text, usage history, profile data, demographics,or the like. In addition, such models can be updated over time based onuser interactions (e.g., frequently entered text or the like). Gatheringand use of user data that is available from various sources can be usedto improve the delivery to users of invitational content or any othercontent that may be of interest to them. The present disclosurecontemplates that in some instances, this gathered data can includepersonal information data that uniquely identifies or can be used tocontact or locate a specific person. Such personal information data caninclude demographic data, location-based data, telephone numbers, emailaddresses, home addresses, or any other identifying information.

The present disclosure recognizes that the use of such personalinformation data, in the present technology, can be used to the benefitof users. For example, the personal information data can be used todeliver targeted content that is of greater interest to the user.Accordingly, use of such personal information data enables calculatedcontrol of the delivered content. Further, other uses for personalinformation data that benefit the user are also contemplated by thepresent disclosure.

The present disclosure further contemplates that the entitiesresponsible for the collection, analysis, disclosure, transfer, storage,or other use of such personal information data will comply withwell-established privacy policies and/or privacy practices. Inparticular, such entities should implement and consistently use privacypolicies and practices that are generally recognized as meeting orexceeding industry or governmental requirements for maintaining personalinformation data private and secure. For example, personal informationfrom users should be collected for legitimate and reasonable uses of theentity and not shared or sold outside of those legitimate uses. Further,such collection should occur only after receiving the informed consentof the users. Additionally, such entities would take any needed stepsfor safeguarding and securing access to such personal information dataand ensuring that others with access to the personal information dataadhere to their privacy policies and procedures. Further, such entitiescan subject themselves to evaluation by third parties to certify theiradherence to widely accepted privacy policies and practices.

Despite the foregoing, the present disclosure also contemplates examplesin which users selectively block the use of, or access to, personalinformation data. That is, the present disclosure contemplates thathardware and/or software elements can be provided to prevent or blockaccess to such personal information data. For example, in the case ofadvertisement delivery services, the present technology can beconfigured to allow users to select to “opt in” or “opt out” ofparticipation in the collection of personal information data duringregistration for services. In another example, users can select not toprovide location information for targeted content delivery services. Inyet another example, users can select to not provide precise locationinformation, but permit the transfer of location zone information.

Therefore, although the present disclosure broadly covers use ofpersonal information data to implement one or more various disclosedexamples, the present disclosure also contemplates that the variousexamples can also be implemented without the need for accessing suchpersonal information data. That is, the various examples of the presenttechnology are not rendered inoperable due to the lack of all or aportion of such personal information data. For example, content can beselected and delivered to users by inferring preferences based onnon-personal information data or a bare minimum amount of personalinformation, such as the content being requested by the deviceassociated with a user, other non-personal information available to thecontent delivery services, or publicly available information.

In accordance with some examples, FIG. 8 shows a functional blockdiagram of an electronic device 800 configured in accordance with theprinciples of the various described examples. The functional blocks ofthe device can be implemented by hardware, software, or a combination ofhardware and software to carry out the principles of the variousdescribed examples. It is understood by persons of skill in the art thatthe functional blocks described in FIG. 8 can be combined or separatedinto sub-blocks to implement the principles of the various describedexamples. Therefore, the description herein optionally supports anypossible combination or separation or further definition of thefunctional blocks described herein.

As shown in FIG. 8, electronic device 800 can include a display unit 802configured to display a text entry interface, and a typed inputreceiving unit 804 configured to receive typed input from a user. Insome examples, typed input receiving unit 804 can be integrated withdisplay unit 802 (e.g., as in a touchscreen). Electronic device 800 canfurther include a processing unit 806 coupled to display unit 802 andtyped input receiving unit 804. In some examples, processing unit 806can include a predicted word determining unit 808, a predicted characterdetermining unit 810, and an integrated probability determining unit812.

Processing unit 806 can be configured to receive typed input from a user(e.g., from typed input receiving unit 804). Processing unit 806 can befurther configured to determine (e.g., using predicted word determiningunit 808), using a word n-gram model, a probability of a predicted wordbased on a previously entered word in the typed input. Processing unit806 can be further configured to determine (e.g., using predictedcharacter determining unit 810), using a character m-gram model, aprobability of a predicted character based on a previously enteredcharacter in the typed input. Processing unit 806 can be furtherconfigured to determine (e.g., using integrated probability determiningunit 812) an integrated probability of the predicted word based on theprobability of the predicted word and the probability of the predictedcharacter. Processing unit 806 can be further configured to cause thepredicted word to be displayed (e.g., using display unit 802) based onthe integrated probability.

In some examples, processing unit 806 can be further configured todetermine (e.g., using predicted word determining unit 808) theprobability of the predicted word based on a plurality of words in thetyped input. In some examples, the plurality of words comprises a stringof recently entered words. For example, recently entered words caninclude words entered in a current input session (e.g., in a currenttext message, a current email, a current document, etc.). For predictingwords, the recently entered words can include the last n words entered(e.g., the last three words, the last four words, the last five words,or any other number of words). Processing unit 806 can be furtherconfigured to determine (e.g., using predicted character determiningunit 810) the probability of the predicted character based on aplurality of characters in the typed input. In some examples, theplurality of characters comprises a string of recently enteredcharacters. For example, recently entered characters can includecharacters in a current input session, including the last m charactersentered (e.g., the last three characters, the last four characters, thelast five characters, or any other number of characters). Processingunit 806 can be further configured to determine (e.g., using integratedprobability determining unit 812) the integrated probability of thepredicted word by determining a joint probability of the predicted wordand the predicted character.

In some examples, processing unit 806 can be further configured todetermine first probabilities of a first set of possible wordcompletions based on a first typed character in the typed input (e.g.,using predicted word determining unit 808), wherein the first set ofpossible word completions comprises the predicted word, and wherein thefirst probabilities comprise the integrated probability of the predictedword. Processing unit 806 can be further configured to determine secondprobabilities of a second set of possible word completions based on thefirst typed character and a second typed character in the typed input(e.g., using predicted character determining unit 810), wherein thesecond set of possible word completions comprises the predicted word.Processing unit 806 can be further configured to determine a reductionin entropy from the first probabilities of the first set to the secondprobabilities of the second set. Processing unit 806 can be furtherconfigured to cause the predicted word to be displayed (e.g., usingdisplay unit 802) in response to the reduction in entropy exceeding athreshold. In some examples, processing unit 806 can be furtherconfigured to determine the reduction in entropy based on thirdprobabilities of a third set of possible word completions, the third setof possible word completions comprising words in the first set ofpossible word completions other than words in the second set of possibleword completions.

In accordance with some examples, FIG. 9 shows a functional blockdiagram of an electronic device 900 configured in accordance with theprinciples of the various described examples. The functional blocks ofthe device can be implemented by hardware, software, or a combination ofhardware and software to carry out the principles of the variousdescribed examples. It is understood by persons of skill in the art thatthe functional blocks described in FIG. 9 can be combined or separatedinto sub-blocks to implement the principles of the various describedexamples. Therefore, the description herein optionally supports anypossible combination or separation or further definition of thefunctional blocks described herein.

As shown in FIG. 9, electronic device 900 can include a display unit 902configured to display a text entry interface, a first typed characterreceiving unit 904 configured to receive a first typed character from auser, and a second typed character receiving unit 906 configured toreceive a second typed character from a user. In some examples, firstand second typed character receiving units 904 and 906 can be integratedinto a single unit, and/or can be integrated with display unit 902(e.g., as in a touchscreen). Electronic device 900 can further include aprocessing unit 908 coupled to display unit 902 and first and secondtyped character receiving units 904 and 906. In some examples,processing unit 908 can include a first entropy determination unit 910,a second entropy determination unit 912, and an entropy reductiondetermination unit 914.

Processing unit 908 can be configured to receive a first typed characterfrom a user (e.g., from first typed character receiving unit 904).Processing unit 908 can be further configured to determine (e.g., usingfirst entropy determining unit 910) a first entropy of a first set ofpossible word completions based on first probabilities of the first setof possible word completions, wherein the first probabilities are basedon the first typed character. Processing unit 908 can be furtherconfigured to receive a second typed character from a user (e.g., fromsecond typed character receiving unit 906). Processing unit 908 can befurther configured to determine (e.g., using second entropy determiningunit 912) a second entropy of a second set of possible word completionsbased on second probabilities of the second set of possible wordcompletions, wherein the second probabilities are based on the firsttyped character and the second typed character. Processing unit 908 canbe further configured to determine (e.g., using entropy reductiondetermining unit 914) a reduction in entropy from the first entropy tothe second entropy. Processing unit 908 can be further configuredto—responsive to the reduction in entropy exceeding a threshold—cause acandidate word to be displayed (e.g., using display unit 902) from thesecond set of possible word completions.

In some examples, processing unit 908 can be further configured todetermine the first probabilities of the first set of possible wordcompletions by determining, using a word n-gram model, thirdprobabilities of a plurality of predicted words based on the first typedcharacter; determining, using a character m-gram model, fourthprobabilities of a plurality of predicted characters based on the firsttyped character; and determining the first probabilities of the firstset of possible word completions based jointly on the thirdprobabilities and the fourth probabilities. In some examples, processingunit 908 can be further configured to determine the second probabilitiesof the second set of possible word completions by determining, using theword n-gram model, fifth probabilities of a plurality of predicted wordsbased on the first typed character and the second typed character;determining, using the character m-gram model, sixth probabilities of aplurality of predicted characters based on the first typed character andthe second typed character; and determining the second probabilities ofthe second set of possible word completions based jointly on the fifthprobabilities and the sixth probabilities.

In some examples, processing unit 908 can be further configured todetermine (e.g., using entropy reduction determining unit 914) thereduction in entropy based on third probabilities of a third set ofpossible word completions, the third set of possible word completionscomprising words in the first set of possible word completions otherthan words in the second set of possible word completions.

In accordance with some examples, FIG. 10 shows a functional blockdiagram of an electronic device 1000 configured in accordance with theprinciples of the various described examples. The functional blocks ofthe device can be implemented by hardware, software, or a combination ofhardware and software to carry out the principles of the variousdescribed examples. It is understood by persons of skill in the art thatthe functional blocks described in FIG. 10 can be combined or separatedinto sub-blocks to implement the principles of the various describedexamples. Therefore, the description herein optionally supports anypossible combination or separation or further definition of thefunctional blocks described herein.

As shown in FIG. 10, electronic device 1000 can include a display unit1002 configured to display a text entry interface, a first typedcharacter receiving unit 1004 configured to receive a first typedcharacter from a user, and a second typed character receiving unit 1006configured to receive a second typed character from a user. In someexamples, first and second typed character receiving units 1004 and 1006can be integrated into a single unit, and/or can be integrated withdisplay unit 1002 (e.g., as in a touchscreen). Electronic device 1000can further include a processing unit 1008 coupled to display unit 1002and first and second typed character receiving units 1004 and 1006. Insome examples, processing unit 1008 can include a first probabilitiesdetermining unit 1010, a second probabilities determining unit 1012, andan entropy reduction determining unit 1014.

Processing unit 1008 can be configured to receive a first typedcharacter from a user (e.g., from first typed character receiving unit1004). Processing unit 1008 can be further configured to determine(e.g., using first probabilities determining unit 1010) firstprobabilities of a first set of possible word completions based on thefirst typed character. Processing unit 1008 can be further configured toreceive a second typed character from a user (e.g., from second typedcharacter receiving unit 1006). Processing unit 1008 can be furtherconfigured to determine (e.g., using second probabilities determiningunit 1012) second probabilities of a second set of possible wordcompletions based on the first typed character and the second typedcharacter. Processing unit 1008 can be further configured to determine(e.g., using entropy reduction determining unit 1014) a reduction inentropy from the first probabilities of the first set to the secondprobabilities of the second set. Processing unit 1008 can be furtherconfigured to—responsive to the reduction in entropy exceeding athreshold—cause a candidate word to be displayed (e.g., using displayunit 1002) from the second set of possible word completions.

In some examples, processing unit 1008 can be further configured todetermine (e.g., using first probabilities determining unit 1010) thefirst probabilities by determining, using a word n-gram model, thirdprobabilities of a plurality of predicted words based on the first typedcharacter; determining, using a character m-gram model, fourthprobabilities of a plurality of predicted characters based on the firsttyped character; and determining the first probabilities based jointlyon the third probabilities and the fourth probabilities. In someexamples, processing unit 1008 can be further configured to determine(e.g., using second probabilities determining unit 1012) the secondprobabilities by determining, using the word n-gram model, fifthprobabilities of a plurality of predicted words based on the first typedcharacter and the second typed character; determining, using thecharacter m-gram model, sixth probabilities of a plurality of predictedcharacters based on the first typed character and the second typedcharacter; and determining the second probabilities based jointly on thefifth probabilities and the sixth probabilities.

In some examples, processing unit 1008 can be further configured todetermine (e.g., using entropy reduction determining unit 1014) thereduction in entropy based on third probabilities of a third set ofpossible word completions, the third set of possible word completionscomprising words in the first set of possible word completions otherthan words in the second set of possible word completions.

Although examples have been fully described with reference to theaccompanying drawings, it is to be noted that various changes andmodifications will become apparent to those skilled in the art (e.g.,modifying any of the systems or processes discussed herein according tothe concepts described in relation to any other system or processdiscussed herein). Such changes and modifications are to be understoodas being included within the scope of the various examples as defined bythe appended claims.

What is claimed is:
 1. A method for determining word predictioncandidates to be displayed, the method comprising: at an electronicdevice: receiving a first typed character from a user; determining afirst entropy of a first set of possible word completions based on firstprobabilities of the first set of possible word completions, wherein thefirst probabilities are based on the first typed character; receiving asecond typed character from the user; determining a second entropy of asecond set of possible word completions based on second probabilities ofthe second set of possible word completions, wherein the secondprobabilities are based on the first typed character and the secondtyped character; determining a reduction in entropy from the firstentropy to the second entropy, wherein determining the reduction inentropy comprises: determining the reduction in entropy based on thirdprobabilities of a third set of possible word completions, the third setof possible word completions comprising words in the first set ofpossible word completions other than words in the second set of possibleword completions; and in response to the reduction in entropy exceedinga threshold, causing a candidate word to be displayed from the secondset of possible word completions.
 2. The method of claim 1, wherein thefirst probabilities of the first set of possible word completions aredetermined by: determining, using a word n-gram model, fourthprobabilities of a plurality of predicted words based on the first typedcharacter; determining, using a character m-gram model, fifthprobabilities of a plurality of predicted characters based on the firsttyped character; and determining the first probabilities of the firstset of possible word completions based jointly on the fourthprobabilities and the fifth probabilities.
 3. The method of claim 2,wherein the second probabilities of the second set of possible wordcompletions are determined by: determining, using the word n-gram model,sixth probabilities of a plurality of predicted words based on the firsttyped character and the second typed character; determining, using thecharacter m-gram model, seventh probabilities of a plurality ofpredicted characters based on the first typed character and the secondtyped character; and determining the second probabilities of the secondset of possible word completions based jointly on the sixthprobabilities and the seventh probabilities.
 4. The method of claim 1,wherein the electronic device comprises a phone, a desktop computer, alaptop computer, a tablet computer, a television, a television set topbox, or a wearable electronic device.
 5. A method for determining wordprediction candidates to be displayed, the method comprising: at anelectronic device: receiving a first typed character from a user;determining first probabilities of a first set of possible wordcompletions based on the first typed character; receiving a second typedcharacter from the user; determining second probabilities of a secondset of possible word completions based on the first typed character andthe second typed character; determining a reduction in entropy from thefirst probabilities of the first set to the second probabilities of thesecond set, wherein determining the reduction in entropy comprises:determining the reduction in entropy based on third probabilities of athird set of possible word completions, the third set of possible wordcompletions comprising words in the first set of possible wordcompletions other than words in the second set of possible wordcompletions; and in response to the reduction in entropy exceeding athreshold, causing a candidate word to be displayed from the second setof possible word completions.
 6. The method of claim 5, whereindetermining the first probabilities comprises: determining, using a wordn-gram model, fourth probabilities of a plurality of predicted wordsbased on the first typed character; determining, using a characterm-gram model, fifth probabilities of a plurality of predicted charactersbased on the first typed character; and determining the firstprobabilities based jointly on the fourth probabilities and the fifthprobabilities.
 7. The method of claim 6, wherein determining the secondprobabilities comprises: determining, using the word n-gram model, sixthprobabilities of a plurality of predicted words based on the first typedcharacter and the second typed character; determining, using thecharacter m-gram model, seventh probabilities of a plurality ofpredicted characters based on the first typed character and the secondtyped character; and determining the second probabilities based jointlyon the sixth probabilities and the seventh probabilities.
 8. The methodof claim 5, wherein the electronic device comprises a phone, a desktopcomputer, a laptop computer, a tablet computer, a television, atelevision set top box, or a wearable electronic device.
 9. Anon-transitory computer-readable storage medium comprising instructionsfor causing one or more processors to: receive a first typed characterfrom a user; determine a first entropy of a first set of possible wordcompletions based on first probabilities of the first set of possibleword completions, wherein the first probabilities are based on the firsttyped character; receive a second typed character from the user;determine a second entropy of a second set of possible word completionsbased on second probabilities of the second set of possible wordcompletions, wherein the second probabilities are based on the firsttyped character and the second typed character; determine a reduction inentropy from the first entropy to the second entropy, whereindetermining the reduction in entropy comprises: determining thereduction in entropy based on third probabilities of a third set ofpossible word completions, the third set of possible word completionscomprising words in the first set of possible word completions otherthan words in the second set of possible word completions; and inresponse to the reduction in entropy exceeding a threshold, cause acandidate word to be displayed from the second set of possible wordcompletions.
 10. The non-transitory computer-readable storage medium ofclaim 9, wherein the first probabilities of the first set of possibleword completions are determined by: determining, using a word n-grammodel, fourth probabilities of a plurality of predicted words based onthe first typed character; determining, using a character m-gram model,fifth probabilities of a plurality of predicted characters based on thefirst typed character; and determining the first probabilities of thefirst set of possible word completions based jointly on the fourthprobabilities and the fifth probabilities.
 11. The non-transitorycomputer-readable storage medium of claim 10, wherein the secondprobabilities of the second set of possible word completions aredetermined by: determining, using the word n-gram model, sixthprobabilities of a plurality of predicted words based on the first typedcharacter and the second typed character; determining, using thecharacter m-gram model, seventh probabilities of a plurality ofpredicted characters based on the first typed character and the secondtyped character; and determining the second probabilities of the secondset of possible word completions based jointly on the sixthprobabilities and the seventh probabilities.
 12. A system comprising:one or more processors; memory; one or more programs, wherein the one ormore programs are stored in the memory and configured to be executed bythe one or more processors, the one or more programs includinginstructions for: receiving a first typed character from a user;determining a first entropy of a first set of possible word completionsbased on first probabilities of the first set of possible wordcompletions, wherein the first probabilities are based on the firsttyped character; receiving a second typed character from the user;determining a second entropy of a second set of possible wordcompletions based on second probabilities of the second set of possibleword completions, wherein the second probabilities are based on thefirst typed character and the second typed character; determining areduction in entropy from the first entropy to the second entropy,wherein determining the reduction in entropy comprises: determining thereduction in entropy based on third probabilities of a third set ofpossible word completions, the third set of possible word completionscomprising words in the first set of possible word completions otherthan words in the second set of possible word completions; and inresponse to the reduction in entropy exceeding a threshold, causing acandidate word to be displayed from the second set of possible wordcompletions.
 13. The system of claim 12, wherein the first probabilitiesof the first set of possible word completions are determined by:determining, using a word n-gram model, fourth probabilities of aplurality of predicted words based on the first typed character;determining, using a character m-gram model, fifth probabilities of aplurality of predicted characters based on the first typed character;and determining the first probabilities of the first set of possibleword completions based jointly on the fourth probabilities and the fifthprobabilities.
 14. The system of claim 13, wherein the secondprobabilities of the second set of possible word completions aredetermined by: determining, using the word n-gram model, sixthprobabilities of a plurality of predicted words based on the first typedcharacter and the second typed character; determining, using thecharacter m-gram model, seventh probabilities of a plurality ofpredicted characters based on the first typed character and the secondtyped character; and determining the second probabilities of the secondset of possible word completions based jointly on the sixthprobabilities and the seventh probabilities.
 15. A non-transitorycomputer-readable storage medium comprising instructions for causing oneor more processors to: receive a first typed character from a user;determine first probabilities of a first set of possible wordcompletions based on the first typed character; receive a second typedcharacter from the user; determine second probabilities of a second setof possible word completions based on the first typed character and thesecond typed character; determine a reduction in entropy from the firstprobabilities of the first set to the second probabilities of the secondset, wherein determining the reduction in entropy comprises: determiningthe reduction in entropy based on third probabilities of a third set ofpossible word completions, the third set of possible word completionscomprising words in the first set of possible word completions otherthan words in the second set of possible word completions; and inresponse to the reduction in entropy exceeding a threshold, cause acandidate word to be displayed from the second set of possible wordcompletions.
 16. The non-transitory computer-readable storage medium ofclaim 15, wherein determining the first probabilities comprises:determining, using a word n-gram model, fourth probabilities of aplurality of predicted words based on the first typed character;determining, using a character m-gram model, fifth probabilities of aplurality of predicted characters based on the first typed character;and determining the first probabilities based jointly on the fourthprobabilities and the fifth probabilities.
 17. The non-transitorycomputer-readable storage medium of claim 16, wherein determining thesecond probabilities comprises: determining, using the word n-grammodel, sixth probabilities of a plurality of predicted words based onthe first typed character and the second typed character; determining,using the character m-gram model, seventh probabilities of a pluralityof predicted characters based on the first typed character and thesecond typed character; and determining the second probabilities basedjointly on the sixth probabilities and the seventh probabilities.
 18. Asystem comprising: one or more processors; memory; one or more programs,wherein the one or more programs are stored in the memory and configuredto be executed by the one or more processors, the one or more programsincluding instructions for: receiving a first typed character from auser; determining first probabilities of a first set of possible wordcompletions based on the first typed character; receiving a second typedcharacter from the user; determining second probabilities of a secondset of possible word completions based on the first typed character andthe second typed character; determining a reduction in entropy from thefirst probabilities of the first set to the second probabilities of thesecond set, wherein determining the reduction in entropy comprises:determining the reduction in entropy based on third probabilities of athird set of possible word completions, the third set of possible wordcompletions comprising words in the first set of possible wordcompletions other than words in the second set of possible wordcompletions; and in response to the reduction in entropy exceeding athreshold, causing a candidate word to be displayed from the second setof possible word completions.
 19. The system of claim 18, whereindetermining the first probabilities comprises: determining, using a wordn-gram model, fourth probabilities of a plurality of predicted wordsbased on the first typed character; determining, using a characterm-gram model, fifth probabilities of a plurality of predicted charactersbased on the first typed character; and determining the firstprobabilities based jointly on the fourth probabilities and the fifthprobabilities.
 20. The system of claim 19, wherein determining thesecond probabilities comprises: determining, using the word n-grammodel, sixth probabilities of a plurality of predicted words based onthe first typed character and the second typed character; determining,using the character m-gram model, seventh probabilities of a pluralityof predicted characters based on the first typed character and thesecond typed character; and determining the second probabilities basedjointly on the sixth probabilities and the seventh probabilities.